package 函数式编程.imooc函数思想

object 递归 {
  def main(args: Array[String]): Unit = {
    def factorial(n: Int): Int = {
      if (n <= 0) 1
      else n * factorial(n - 1)
    }
  }

}
